package com.yuan.job.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import java.util.Date;

@Configuration
@EnableScheduling
public class ScheduleTask {
    @Scheduled(cron = "0/5 * * * * ?")
    private void cofigureTasks(){
        System.out.println(String.format("quartz MyJob date: %tT%n",new Date()));
    }
}
